package cn.schoolwow.quickdao.module.operation.service;

import cn.schoolwow.quickdao.module.operation.flow.generateEntity.CheckGenerateEntityFileRequestFlow;
import cn.schoolwow.quickdao.module.operation.flow.generateEntity.SetDatabaseEntityListFlow;
import cn.schoolwow.quickdao.module.operation.flow.generateEntity.TraverseDatabaseEntityFlow;
import cn.schoolwow.quickflow.QuickFlowExecutor;
import cn.schoolwow.quickflow.flow.CompositeBusinessFlow;

public class GenerateJavaSourceFileCompositeBusiness implements CompositeBusinessFlow {
    @Override
    public void executeCompositeBusiness(QuickFlowExecutor quickFlowExecutor) {
        quickFlowExecutor.next(new CheckGenerateEntityFileRequestFlow())
                .next(new SetDatabaseEntityListFlow())
                .next(new TraverseDatabaseEntityFlow());
    }

    @Override
    public String name() {
        return "生成实体类文件";
    }
}
